import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            component: () => import('components/Main.vue'),
            children: [
              {
                  path: '/',
                  name: 'home',
                  component: () => import('components/Home.vue'),
              },
              {
                  path: '/login',
                  name: 'login',
                  component: () => import('components/Login.vue'),
              },
              {
                  path: '/register',
                  name: 'register',
                  component: () => import('components/Register.vue'),
              },
              {
                  path: '/cart',
                  name: 'cart',
                  component: () => import('components/Cart.vue'),
              },
              {
                  path: '/detail',
                  name: 'detail',
                  component: () => import('components/Detail.vue'),
              },
              {
                  path: '/cake',
                  name: 'cake',
                  component: () => import('components/Cake.vue'),
              }
            ]
        },
    ]
})